<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>会员列表</title>
    <script th:src="@{/layui/layui.js}" type="text/javascript"></script>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
</head>
<body>
<div class="layui-panel" style="padding: 8px;">
    <fieldset class="layui-elem-field layui-border-green">
        <legend>搜索信息</legend>
        <form class="layui-form layui-form-pane" style="margin: 20px;">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">用户名称</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="name" autocomplete="off" />
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <a class="layui-btn layui-btn-primary" lay-summit="" lay-filter="searchBtn">
                            <i class="layui-icon layui-icon-search">
                                搜索
                            </i>
                        </a>
                    </div>
                </div>
            </div>
        </form>
    </fieldset>
    <div>
        <table id="memberListTable" lay-filter="memberListTable"></table>
    </div>
</div>
<script id="tool" type="text/html">

    <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="look">详情</a>

</script>
<script id="tableBar" type="text/html">
    <a class="layui-btn layui-btn-normal layui-btn-md" lay-event="add">
        <i class="layui-icon layui-icon-add-1"></i>
        新增
    </a>
    <!--<a class="layui-btn layui-btn-danger layui-btn-md" lay-event="delete">
        <i class="layui-icon layui-icon-delete"></i>
        删除
    </a>-->
</script>
<script id="switchState" type="text/html">
    <input type="checkbox" name="state" value="{{d.state}}"
           lay-skin="switch" lay-text="是|否" lay-filter="checkstate" {{d.state==0?"checked":""}} />
</script>
<script id="photo" type="text/html">
    {{# if(d.isUpdate==0){ }}
    <img src="/file/fc/showImg/{{d.photoPath}}" style="width: 30px;height: 60px;">
    {{# }}}
</script>
<script>
    var data = [
        {"userName":"userbane"}
    ];
    layui.use(['table','form','layer'],function(){
        var table = layui.table,form = layui.form,
            layer = layui.layer;

        //加载表格
        table.render({
            elem:'#memberListTable',
            height:'full-160',
            page: {
                theme:'#1e9fff'
            },
            toolbar:'#tableBar',
			url:'/system/uc/find',
            cols:[
                [
                {type:'numbers',fixed:'left'},
                {type:'checkbox',fixed:'left'},
                {field:'id',title:'用户id',width:150},
                {field:'name',title:'用户名称',width:150},
                {field:'photo',title:'用户头像',width:80,templet: '#photo',align: 'center'},
                {field:'phone',title:'手机号码'},
                {field:'sex',title:'性别'},
                {field:'birthday',title:'生日',width:250},
                {field:'rank',title:'用户等级'},
                {fixed:'right',title:'操作',width:150,align:'center',toolbar:'#tool'},
            ]
            ],
        })
    })

</script>
</body>
</html>
